﻿namespace IceCS.DesignPattern.Core.AbstractFactoryPattern.WorldThings
{
    public enum FactoryType
    {
        Color,
        Shape
    }

    public class FactoryProvider
    {
        public static WorldThingsFactory GetFactory(FactoryType type)
        {
            return type switch
            {
                FactoryType.Color => new ColorFactory(),
                FactoryType.Shape => new ShapeFactory(),
                _ => null,
            };
        }
    }
}
